import request from '@/utils/request'

export function getSupplier(id) {
  return request({
    url: '/supplier/get',
    params: {
      'id': id
    },
    method: 'get'
  })
}

export function listSupplier(pos, size, conditions) {
  return request({
    url: '/supplier/list',
    params: {
      'jsonCondition': JSON.stringify(conditions),
      'pos': pos,
      'size': size
    },
    method: 'get'
  })
}
export function delSupplier(suppliermodel) {
  return request({
    url: '/supplier/del',
    data: suppliermodel,
    method: 'post'
  })
}
export function delSuppliers(jsonSupplierModel) {
  return request({
    url: '/supplier/bulkdel',
    data: {
      data: jsonSupplierModel
    },
    method: 'post'
  })
}
export function setSupplier(suppliermodel) {
  return request({
    url: '/supplier/set',
    data: suppliermodel,
    method: 'post'
  })
}
export function listMember(id) {
  return request({
    url: '/supplier/listmember',
    params: {
      'id': id
    },
    method: 'get'
  })
}
export function setMember(supplierid, jsonmember) {
  return request({
    url: '/supplier/setmember',
    data: {
      supplier: supplierid,
      jsonSupplierMemberModel: jsonmember
    },
    method: 'post'
  })
}
